package com.jml.juc.fork;


import java.util.List;
import java.util.concurrent.RecursiveTask;

/**
 *
 */

public class ForkJoinTaskBoot1 extends RecursiveTask<String> {


    //执行小任务
    @Override
    public String compute() {
        String name = Thread.currentThread().getName();
        System.out.println(name + "  begin");
        try {
            Thread.sleep(6000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(name + "  end");
         return name;
    }
}

